home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / WIN_VB / MLST43.ZIP;1 / VIRTUAL.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1994-02-27  |  2.8 KB  |  97 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    Caption         =   "Form1"
  4.    ClientHeight    =   5052
  5.    ClientLeft      =   1368
  6.    ClientTop       =   1644
  7.    ClientWidth     =   5724
  8.    Height          =   5472
  9.    Left            =   1320
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   5052
  12.    ScaleWidth      =   5724
  13.    Top             =   1272
  14.    Width           =   5820
  15.    Begin MListBox MList1 
  16.       Alignment       =   0  'None
  17.       AllowFocusRect  =   -1  'True
  18.       BorderStyle     =   0  'Normal
  19.       CheckColor      =   &H00000000&
  20.       CheckStyle      =   1  'Check Mark
  21.       DrawRegions     =   2
  22.       EnableVirtualMsgs=   -1  'True
  23.       ExtendedSelect  =   0   'False
  24.       FallColor       =   &H00808080&
  25.       FindDirection   =   0  'Forward
  26.       GridColor       =   &H00000000&
  27.       GridStyle       =   0  'Solid
  28.       Height          =   4524
  29.       HiliteBackColor =   &H00000000&
  30.       HiliteForeColor =   &H00000000&
  31.       HorizontalGrids =   0   'False
  32.       ImageRegion     =   1
  33.       ImageType       =   0  'None
  34.       ItemHeight      =   300
  35.       ItemWidth       =   1560
  36.       Left            =   144
  37.       MaskingColor    =   &H00FFFFFF&
  38.       MultiColumn     =   0   'False
  39.       MultiSelect     =   0   'False
  40.       RiseColor       =   &H00FFFFFF&
  41.       Sorted          =   0   'False
  42.       TabIndex        =   0
  43.       Top             =   144
  44.       Version         =   "04.20"
  45.       VerticalGrids   =   0   'False
  46.       VirtualMsgZone  =   10
  47.       Width           =   5148
  48.    End
  49. Sub Form_Load ()
  50.   Dim X As Integer
  51.   For X = 0 To 9
  52.     MList1.AddItem "Section1"
  53.   Next X
  54.   For X = 0 To 5
  55.     MList1.AddItem "This is a test string"
  56.     MList1.AddItem "This is a test string II"
  57.     MList1.AddItem "This is a test string III"
  58.     MList1.AddItem "This is a test string III"
  59.   Next X
  60. End Sub
  61. Sub MList1_VirtualMessage (Message As Integer)
  62.   If Message = 1 Or Message = 3 Then
  63.     Dim I As Integer
  64.     Dim Index As Integer
  65.     Dim TopIndex As Integer
  66.     If MList1.List(0) = "Section1" Then
  67.       
  68.       Index = MList1.ListIndex
  69.       TopIndex = MList1.TopIndex
  70.       For I = 0 To 9
  71.         MList1.AddItem "Section II"
  72.       Next I
  73.       
  74.       For I = 0 To 9
  75.         MList1.RemoveItem 0
  76.       Next I
  77.       MList1.TopIndex = TopIndex - 10
  78.       MList1.ListIndex = Index - 10
  79.     End If
  80.   Else
  81.     If MList1.List(0) <> "Section1" Then
  82.       
  83.       Index = MList1.ListIndex
  84.       TopIndex = MList1.TopIndex
  85.       For I = 0 To 9
  86.         MList1.AddItem "Section1", 0
  87.       Next I
  88.       
  89.       For I = 0 To 9
  90.         MList1.RemoveItem MList1.ListCount - 1
  91.       Next I
  92.       MList1.TopIndex = TopIndex + 10
  93.       MList1.ListIndex = Index + 10
  94.     End If
  95.   End If
  96. End Sub
  97.